Real time configuration of multiple true random number generator sources for optimized entropy generation

ABSTRACT

A computer-implemented method for generating one or more random numbers includes configuring a mapper to feed inputs of a random number generation system using a subset of noise sources from multiple noise sources. The random number generation system generates a random number based on the inputs. The method further includes evaluating the subset of noise sources and detecting that a first noise source from the subset of noise sources has degraded in quality. The method further includes evaluating a second noise source from the available noise sources, the second noise source not being in the subset of noise sources. In response to the second noise source satisfying a predetermined threshold criterion, the first noise source is replaced with the second in the subset of noise sources for providing random bit streams to facilitate generating the random number by the random number generation system.

BACKGROUND

The present invention relates generally to computing technology, andparticularly to improving entropy quality of random number generation byconfiguring multiple random number generator sources.

A sequence of random numbers is useful in many areas of science,research, mathematics and manufacturing, such as simulation,cryptography, medical research, statistical process control, and gaming,to name just a few. Accordingly, various computer applications aredependent on the ability to generate unpredictable random numbers.Hence, some computing devices provide access to a random numbergenerator (RNG), sometimes called a random bit generator (RBG). Thereare two classes of RNG: (1) a true random number generator (TRNG),sometimes called a non-deterministic random number generator (NDRNG);and (2) a pseudo-random number generator (PRNG), sometimes called thedeterministic random number generator (DRNG).

SUMMARY

According to one or more embodiments of the present invention, acomputer-implemented method for generating one or more random numbersincludes configuring, by a controller, a mapper to feed inputs of arandom number generation system using a subset of noise sources from apool of noise sources. The random number generation system generates arandom number based on the inputs. The method further includesevaluating, by the controller, the subset of noise sources. The methodfurther includes detecting, by the controller, that a first noise sourcefrom the subset of noise sources has degraded in quality. The methodfurther includes evaluating, by the controller, a second noise sourcefrom the pool of noise sources, the second noise source not being in thesubset of noise sources. The method further includes, in response to thesecond noise source satisfying at least a predetermined thresholdcriterion, replacing, by the controller, the first noise source with thesecond noise source in the subset of noise sources. The method furtherincludes forwarding, by the mapper, outputs from each of the subset ofnoise sources to corresponding inputs of the random number generationsystem, the outputs providing random bit streams to facilitategenerating the random number by the random number generation system.

According to one or more embodiments of the present invention, a systemfor random number generation includes a multiplexer, a memory device,and at least one processing unit coupled with the multiplexer and thememory device. The processing unit(s) perform a method that includesconfiguring a mapper to feed inputs of a random number generation systemusing a subset of noise sources from a pool of noise sources. The randomnumber generation system generates a random number based on the inputs.The method further includes evaluating the subset of noise sources. Themethod further includes detecting that a first noise source from thesubset of noise sources has degraded in quality. The method furtherincludes evaluating a second noise source from the pool of noisesources, the second noise source not being in the subset of noisesources. The method further includes, in response to the second noisesource satisfying at least a predetermined threshold criterion,replacing the first noise source with the second noise source in thesubset of noise sources. The method further includes forwarding, by themapper, outputs from each of the subset of noise sources tocorresponding inputs of the random number generation system, the outputsproviding random bit streams to facilitate generating the random numberby the random number generation system.

According to one or more embodiments of the present invention, acomputer program product for generating random numbers includes astorage medium readable by one or more processing circuits. The storagemedium stores instructions that are executable by the one or moreprocessing circuits to cause a method to be performed. The methodincludes configuring a mapper to feed inputs of a random numbergeneration system using a subset of noise sources from a pool of noisesources. The random number generation system generates a random numberbased on the inputs. The method further includes evaluating the subsetof noise sources. The method further includes detecting that a firstnoise source from the subset of noise sources has degraded in quality.The method further includes evaluating a second noise source from thepool of noise sources, the second noise source not being in the subsetof noise sources. The method further includes, in response to the secondnoise source satisfying at least a predetermined threshold criterion,replacing the first noise source with the second noise source in thesubset of noise sources. The method further includes forwarding, by themapper, outputs from each of the subset of noise sources tocorresponding inputs of the random number generation system, the outputsproviding random bit streams to facilitate generating the random numberby the random number generation system.

Additional technical features and benefits are realized through thetechniques of the present invention. Embodiments and aspects of theinvention are described in detail herein and are considered a part ofthe claimed subject matter. For a better understanding, refer to thedetailed description and to the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a block diagram of an example random numbergeneration system in accordance with one or more embodiments describedherein.

FIG. 2 depicts a controller to manage random number generation accordingto one or more embodiments of the present invention.

FIG. 3A depicts a flowchart of a method for evaluating noise sources forgenerating random number(s) according to one or more embodiments of thepresent invention.

FIG. 3B depicts a flowchart of a method for generating random number(s)according to one or more embodiments of the present invention.

FIG. 4 depicts an example scenario depicting selection of noise sourcesfor generating random number(s) according to one or more embodiments ofthe present invention.

FIG. 5 depicts a computer system that can implement one or moreembodiments of the present invention.

The diagrams depicted herein are illustrative. There can be manyvariations to the diagrams or the operations described therein withoutdeparting from the spirit of the invention. For instance, the actionscan be performed in a differing order or actions can be added, deletedor modified. Also, the term “coupled” and variations thereof describehaving a communications path between two elements and do not imply adirect connection between the elements with no interveningelements/connections between them. All of these variations areconsidered a part of the specification.

DETAILED DESCRIPTION

One or more embodiments of the present invention facilitate optimizationof random number generation by configuring multiple entropy generationsources in a system. Typically, a system, such as a computing device,can include a true random number generator (TRNG) that can be accessedby one or more applications/devices of the system. The TRNG extractsentropy from one or more noise sources (or entropy sources) in thesystem and compresses the entropy into a stream of random bytes. Forhardware-based TRNG modules, the noise sources are one or more hardwarecomponents from the device. For example, a resistor in the device can beused as a noise source, where result of sampling a thermal noise fromthe resistor is used as the noise (entropy) for generating randomnumbers. As examples, true random number generators may be based onquantum effects of radioactive isotope decay, atmospheric radio noise,interference of ring oscillators, etc.

Typically, to generate a random bit stream, the system combines, forexample, using a logical operation like XOR, several streams of randombits from respective noise sources to achieve a resulting random bitstream with an entropy quality that is higher than any of the individualbit streams. A technical challenge for a system is to evaluate thequality of each individual noise source that provides the random bitstreams, and to choose those bit streams that have at least anacceptable threshold quality, which can be provided by a user. Suchselected bit streams are combined (e.g., XORed) together to create thefinal resulting random bit stream. Embodiments of the present inventionaddress such technical challenges and facilitate selecting a combinationof bit streams based on an assessment of the noise (entropy) sourcesthat are available to the system.

FIG. 1 depicts a block diagram of a random number generation systemaccording to one or more embodiments of the present invention. Thedepicted system 100 includes multiple noise sources 110, a mapper 120, acontroller 130, a random number generator 140. The system 100 providesone or more random numbers to a consumer device 150. Alternatively, orin addition, the system 100 provides notifications, for example to auser, via a notification device 160.

The system can have N noise sources 110, labeled 1 through N in FIG. 1,where N can vary per system. In one or more embodiments of the presentinvention, the noise sources 110 can be various operational devices andcan include programs, applications, OS subroutines, etc. that generateentropy values. Alternatively, or in addition, the noise sources 110 caninclude hardware components, such as specially configured circuits thatgenerate statistically random noise signals based on various effectssuch as thermal noise, the photoelectric effect or other quantumphenomena, timing of certain events, etc. For example, a counter andtiming system can be used to aggregate entropy values based on systemevents (e.g., keystrokes, system calls, etc.). in yet another example,the noise sources can include a ring oscillator, or a multiple ringoscillator sampler. Various other examples of noise sources that are notlisted herein can be used in other embodiments of the present invention.It should be noted that in one or more embodiments of the presentinvention, the noise sources 110 can include a combination of varioustypes of noise sources. In one or more embodiments of the presentinvention, the noise sources 110 generate a random bit string at aparticular frequency that is based on a clock 105. For example, at apredetermined clock-cycle, the clock 105 sends an ‘enable’ signal to oneor more of the noise sources 110 to generate a respective random bitstream.

The mapper 120 is coupled with the noise sources 110 so that the mapper120 can receive N inputs, one from each of the noise sources 110. Eachof the N inputs is a random bit stream from the respective noise source110. The mapper 120 maps the N input streams to P output random bitstreams, where N≥P, and where the P output random bit streams areprovided to a random number generator 140 in one or more examples.Alternatively, or in addition, the P outputs can be provided to anyother device/component that uses multiple random bit streams.

The random number generator 140 can use the P random bit streams forgenerating one or more random numbers. The random number(s) can beprovided to the consumer device 150, which can use the random number(s)for functions such as simulation, cryptography, medical research,statistical process control, and gaming, to name just a few.

The controller 130 continuously monitors and evaluates a quality of eachof the noise sources 110, and particularly the quality of the random bitstream that is generated by the noise sources 110. In one or moreembodiments of the present invention, the quality of a noise source 110can depend on process-voltage-temperature (PVT) of the noise source 110.As such, the quality can be characterized by the PVT parameters. in oneor more embodiments of the present invention, the controller 130continuously evaluate the noise sources 110 to ensure that the randombit streams being used by the random number generator 140 meet one ormore predetermined quality criteria.

In one or more embodiments of the present invention, in the event thatone or more of the random bit streams do not meet the criteria, thecontroller 130 swaps in a new noise source of recently evaluated bitstream to replace the previously evaluated noise source. Alternatively,or in addition, if replacement with a new source also does not satisfythe predetermined criteria, the controller 130 uses the notificationdevice 160 to notify a user that the random number generation qualitydoes not meet the specified threshold. In one or more examples, the userconfigures the threshold that is to be used. In one or more examples,the user, upon receiving the notification, can change the threshold.Alternatively, or in addition, the user can change the random numbergeneration technique being used by the random number generator 140.

For example, the random number generator 140 can be a deterministicrandom number generator (DRNG) that operates using a predeterminedalgorithm to generate a random number based on the input bit stream(s).The algorithm can be changed based on the quality of the random numbersbeing generated, in one or more embodiments of the present invention.

FIG. 2 depicts a block diagram of a controller according to one or moreembodiments of the present invention. The depiction is one possiblestructure of the controller 130. It is understood that in one or moreembodiments of the present invention the structure can be modified. Thecontroller 130 includes one or more processing units 210, and one ormore memory devices 220. In one or more embodiments of the presentinvention, the controller 130 includes a multiplexer 230 for selectionof particular inputs to be evaluated. While the multiplexer 230facilitates an efficient use of the entropy assessment resources of thecontroller, in one or more embodiments of the present invention, eachinput stream can be connected directly to the one or more processingunits for evaluation. In one or more examples, the processing units 210evaluates the noise sources 110 using an entropy assessment module 240.Further, the processing units includes an operations manager module 250that controls the processing of the random number generator 130 bybookkeeping the results of the assessment of the noise sources 110.

In one or more embodiments of the present invention, the processingunits 210 operate based on one or more computer executable instructionsthat are stored in the memory devices 220. The memory devices 220 canfurther include memory devices and/or locations that are used as ascratchpad during execution of the instructions. Alternatively, or inaddition, the processing units 210 include hardware units, such as fieldprogrammable array (FPGA), integrated circuits (IC), such as applicationspecific ICs (ASICs), or other types of digital and/or analog circuitry.In one or more embodiments of the present invention, the memory devices220 store a look-up table 225 that identifies a grade for each noisesource 110. In one or more embodiments of the present invention, thelook-up table 225 has grades only for the noise sources 110 that arebeing used by the mapper 120, for example, the P noise sources 110 thatare used to provide random bit streams to the random number generator140. Further, the operations manager 250 keeps a record of the noisesources 110 that are being used, those that have never been used, aswell as those noise sources that have failed (and are no longer beingused). Such information can be stored in the look-up table 225 in one ormore embodiments of the present invention. Alternatively, the operationsmanager 250 stores such information in another data structure, such as atable, in the memory devices 220.

The multiplexer 230 facilitates the processing units 210 to select oneof the noise sources 110 to be assessed. For example, the processingunits send a control signal to the multiplexer 230 for the selection ofone or more from the N noise sources 110. In response, the multiplexer230 forwards the random bit stream from the selected noise source 110for the entropy assessment 240. The result from the entropy assessment240 is forwarded to the operations manager 250 for bookkeeping and datacontrol.

FIG. 3A depicts a flowchart of an example method 300 for random numbergeneration according to one or more embodiments of the presentinvention. In one or more embodiments of the present invention, theoperations depicted by the flowchart can be performed in an order thatis different from the sequence of operations depicted. Alternatively, orin addition, one or more of the operations can be performed in parallelin one or more embodiments of the present invention. The depicted method300 includes generating multiple random bit streams from the set ofnoise sources 110, at block 302. In one or more examples, a clock signalfrom the clock 105 is sent to the noise sources 110 to generate therandom bit streams. In one or more examples, the random bit streams aregenerated in parallel by the noise sources 110. In some examples, therandom bit streams are generated sequentially.

The method further includes evaluating the random bit streams, at block304. In one or more embodiments of the present invention, the entropyassessment 240 receives each of the random bit streams as input. In oneor more examples, the operations manager 250 sends a multiplexer controlsignal to the multiplexer 230 to select which one of the multiple randombit streams to input for the entropy assessment 240.

The entropy assessment 240 evaluates the received bit stream andproduces a pass/fail output. Alternatively, or in addition, the entropyassessment 240 produces an entropy quality grade for each bit stream. Inyet another example, the entropy assessment 240 produces multipleentropy quality grades for each bit stream.

The entropy assessment 240 determines, based on the evaluation, whethera random bit stream meets a predetermined threshold criterion, at block306. In one or more examples, the threshold criterion is configured by auser. The entropy assessment 240 can apply multiple criteria to evaluatethe bit streams.

For example, the entropy assessment 240 executes a suite of statisticalanalysis tests over the raw data in the random bit stream. In one ormore embodiments of the present invention, the tests are performed onparticular portions of the bit stream and the results of each portionare concatenated. For example, consider that the bit stream includes “m”bits that are divided into “n” groups where each of the “n” groups (bitstream) has 1,000,000 (1 million) bits. Various tests are conducted overeach of these group. For example: “m”=10 million bits, then group n=10where each group has 1 million bits. Accordingly, in the result file onewould see total 10 test cases per statistical test.

The statistical tests can include a frequency test for number of ‘1’ and‘0’ in a sequence. The statistical tests can also include a frequencytest within a block of bits. The test checks the proportion of ‘1’ (or0s) in M bit blocks with a predetermined ratio, for example, M/2.Further, the statistical tests can check runs of particular patterns,i.e., tests for identical bit length in a sequence. The statisticaltests can also include testing longest runs of ones, i.e., length of bit‘1’ in a sequence.

In one or more embodiments of the present invention, the statisticaltests can include a binary matrix rank test. The purpose of this test isto check for linear dependence among fixed length sub strings of theoriginal sequence, which is tested through the rank of disjointsub-matrices of the entire sequence. Alternatively, or in addition, thestatistical tests include a Discrete Fourier Transform (DFT) test. Thepurpose of this test is to detect periodic features (i.e., repetitivepatterns that are near each other) in the tested sequence that wouldindicate a deviation from the assumption of randomness which is testedthrough DFT of the sequence of bits.

Further yet, in one or more embodiments of the present invention, thestatistical tests include a non-overlapping template matching test. Thischecks the number of occurrences of pre-specified target strings. Thepurpose of this test is to detect generators that produce too manyoccurrences of a given non-periodic (aperiodic) pattern. If the patternis not found, the window slides one bit position. If the pattern isfound, the window is reset to the bit after the found pattern, and thesearch resumes. Alternatively, or in addition, the statistical testsinclude an overlapping template matching test, which also checks thenumber of occurrences of pre-specified target strings. The differencebetween this test and the non-overlapping template matching test isthat, in this case, when the pattern is found, the window slides onlyone bit before resuming the search.

The statistical tests can include several other tests such as Maurer's“Universal Statistical” Test that checks the number of bits betweenmatching patterns. A linear complexity test determines if the sequenceis complex enough to be considered random by testing the length of alinear feedback shift register (LFSR). Further, a serial test determineswhether the number of occurrences of the 2 mm-bit overlapping patternsis approximately the same as would be expected for a random sequence. Anapproximate entropy test includes comparing the frequency of overlappingblocks of two consecutive/adjacent lengths (m and m+1) against anexpected result for a random sequence. A cumulative sum test determineswhether the cumulative sum of the partial sequences occurring in thetested sequence is too large or too small relative to the expectedbehavior of that cumulative sum for random sequences. In randomexcursion test it is determined if the number of visits to a statewithin a cycle deviates from what one would expect for a randomsequence. A random excursion variant test includes detecting deviationsfrom the expected number of visits to various states in the random walk.

It is understood that the list of tests described herein can be used invarious combinations and that additional tests can also be included toevaluate the bit streams. The particular test(s) that is/are used forthe evaluation do not affect one or more embodiments of the presentinvention. Each test that is executed can provide a grade to the bitstream that is being evaluated. In one or more embodiments of thepresent invention, the grades are combined into a single grade, forexample, by averaging, weighted averaging, or other combiningtechniques. In one or more embodiments of the present invention, thegrade is binary-pass/fail.

Referring back to the flowchart of FIG. 3A, if the bit stream satisfiesthe threshold criterion (at block 306) that is set for the quality ofthe bit stream, i.e., if grade(s) exceed threshold criterion grade(s),the method 300 includes marking the noise source 110 being evaluated as‘passing’, at block 307. Alternatively, if the bit stream does notsatisfy the threshold criterion (at block 306), the noise source 110 ismarked as ‘failing’, at block 309. For example, the PVT parameters of afirst noise source 110, for example, an ROS, can change resulting in therandom bit stream generated by the first noise source 110 to fail thethreshold criterion. The PVT parameters can change because of variousreasons, such as overuse, malfunction, etc. In such a case, an entry inthe look-up table 225 for the first noise source 110 will be marked as‘failing’ (e.g., 0).

The look-up table 225 is updated with the result of the evaluation. Inone or more embodiments of the present invention, the passing grade canbe represented by a ‘1’ and the failing grade can be represented by a‘0’. It is understood that other representations of the grades can beused in other embodiments of the present invention.

The method 300 to evaluate the random bit streams proceeds continuously.The operations manager 250 selects one of the bit streams from the noisesources 110 for assessment, at block 310. Accordingly, the entropyassessment 240 continuously updates the look-up table 225, which can bequeried for quality status of the pool of noise sources 110. Forexample, the operations manager 250 can use the look-up table 225 toupdate the mapping configuration of the mapper 120.

FIG. 3B depicts a flowchart of an example method 350 for random numbergeneration according to one or more embodiments of the presentinvention. The method 350 includes checking, by the operations manager250, that the noise sources 110 that are mapped to the P outputs of themapper 120, i.e., are being used to provide random bit streams to therandom number generator 140, are ‘passing’, at block 352. The operationsmanager 250 checks the look-up table 225 for the grades of the bitstreams. In one or more embodiments of the present invention, as long asthe noise sources 110 in use are passing, bit streams from those noisesources 110 are continued to be sent for random number generation (asshown in FIG. 3A).

If any of the noise sources 110, say a first noise source 110 has afailing grade, the operations manager 250 determines if there are anynoise sources 110 in the system 100 that have not been used yet, atblock 358. Because the mapper 120 selects P random bit streams from theN noise sources 110 that are available to the system 100, the operationsmanager 250 checks if any of the remaining N-P noise sources can be usedinstead of the first noise source 110 that has failed.

As noted earlier, the operations manager 250 keeps a record of the noisesources 110 that are being used as well as those that have failed thecriteria. The operations manager 250 also has a record of all the noisesources 110 available to the system 100. Accordingly, the operationsmanager 250 identifies and selects a next unused noise source. Theoperations manager replaces the first noise source 110 (that failed)with this second (unused) noise source, at block 360. In one or moreembodiments of the present invention, the operations manager initiatesand evaluates a random bit stream from the second noise source 110. Inone or more embodiments of the present invention, the operations manager250 sends an initiation signal, such as a CLK to the second noise source110. The operations manager 250 also selects that bit stream, via themultiplexer 230, to be evaluated by the entropy assessment 240, asdescribed herein earlier. The grade of the second noise source 110 ischecked, at block 354.

If at least P noise sources 110 are not available, the operationsmanager 250 takes a mitigation action, at block 357. The mitigationaction can include sending a notification to the user. Alternatively, orin addition, the mitigation action can include suspending the operationof the random number generator 140. Alternatively, or in addition, inone or more embodiments of the present invention, the user can cause theoperations manager 250 to adjust processing algorithms of the randomnumber generator 140 based on the entropy quality of the available noisesources 110. Alternatively, or in addition, the user can cause theoperations manager 250 to adjust the threshold criterion for selectionof the noise sources 110.

For example, suppose the random bit streams are evaluated by criteriax1, x2, and x3, where x3 is the highest quality. If at least P noisesources that satisfy x3 are not available, and if the quality drops tox2, the user can cause the random number generator 140 to execute one ormore processing algorithms that enhance the quality of the bit streams.In one or more embodiments of the present invention, the processingunits 210 can notify the random number generator 140 to execute thealgorithms. In this manner, the processed bit streams meet x3 qualityrequirements, but by applying a more expensive processing algorithm. Incomparison, if P bit streams that meet the x3 criterion are available,the random number generator 140 does not have to execute the expensivealgorithms.

In one or more embodiments of the present invention, the methods 300 and350 can be executed in parallel and in a continuous manner.Alternatively, in one or more embodiments of the present invention, themethods 300 and 350 are executed sequentially, in a continuous manner.

Accordingly, one or more embodiments of the present invention facilitategenerating one or more random numbers using noise sources that satisfy athreshold criterion. Further, one or more embodiments of the presentinvention facilitate continuously monitoring the quality of the noisesources and selecting the noise sources that satisfy the thresholdcriterion. In the event that the quality of a noise source drops belowthe threshold criterion, a replacement noise source is identified andselected. It should be noted that the noise sources that are not beingused can be maintained in a suspended state. Accordingly, the life ofthe noise sources is potentially lengthened because only minimumrequired noise sources are enabled at any one time, with those noisesources that are not being used, placed in a suspended state. An examplecause for reduction in life expectancy of a noise source iselectro-migration (EMIG) on a ROS. Electro-migration is the transport ofmaterial caused by the gradual movement of the ions in a conductor dueto the momentum transfer between conducting electrons and diffusingmetal atoms. The effect is important in applications where high directcurrent densities are used, such as in microelectronics and relatedstructures.

FIG. 4 depicts an example scenario of selecting noise sources inoperation according to one or more embodiments of the present invention.For this example, let N=8, P=4, and consider that the system 100 isinitialized, has been running, and configured so that the mapper 120feeds random bit streams from noise sources 2:5 to consumer inputs 0:3.Further consider that the controller works round robin to select a newnoise source 110, and replaces old ones from top down. In otherexamples, any other algorithm can be used for such selection andreplacement. Accordingly, in this example, the next candidate noisesource is source 6. Further, consider that the input-0 of the randomnumber generator 140 is to the be swapped. This information is shown intable 410.

The operations manager 250 uses the multiplexer 230 to select the randombit stream from the noise source 6, and the entropy assessment 240evaluates it and gives it a pass/fail grade. Suppose that the noisesource fails, the operations manager 250 updates the record for thenoise source 6, and the next candidate noise source 7 is selected as areplacement. This information is shown in table 420. In one or moreembodiments of the present invention, if a noise source that waspreviously “good” is assessed as “bad,” a suspend signal to the randomnumber generator 140 can be raised, and not lowered until all inputs tothe random number generator 140 have been re-evaluated.

Further along, suppose that the noise source 7 passes. The operationsmanager 250 updates the mapper 120, and noise source 7 now feeds theinput 0 of the random number generator 140 (instead of the noise source2). The noise source 2, which was previously feeding the input 0, issuspended in one or more embodiments of the present invention. Thisinformation is shown in the state table 430.

These operations, as shown in the method 300 and in the method 350,continue as long as the system 100 is operative. The methods 300 and 350are executed using the clock 105 operating at a predetermined frequencyin one or more embodiments of the present invention. The operationsmanager 250 and entropy assessment module 240 continuously update therecords in the look-up table 225, which can be queried for qualitystatus of the pool of noise sources 110 in one or more embodiments ofthe present invention.

Embodiments of the present invention facilitate dynamic enabling ofindividual noise sources in a random number generation system. The noisesources can also be referred to as entropy sources or entropy suppliers.Such dynamic enabling (and disabling) of the noise sources canfacilitate lengthening product life of the random number generationsystem because only minimum required entropy sources are enabled at anyone time. Those not being used can be suspended. An example would beEMIG on a ROS. Further, the technical features described herein improvePVT variation tolerance of the random number generation system. Someentropy sources may produce higher quality than others at various PVT.Because the pool of entropy sources is always being evaluated and thebest sources enabled, the random number generation system can provide aconsistent output regardless of PVT.

Further, in one or more embodiments of the present invention, the randomnumber generation system facilitates hardware control of entropyselection and hence improves security of the technical featuresprovided. In one or more embodiments of the present invention, theentropy quality checks are performed within a secure boundary if therandom number generation system is within a hardware security module(HSM).

In one or more embodiments of the present invention, the technicalfeatures of the random number generation system can be used as precisionhardware characterization tool for qualifying hardware.

Further, in one or more embodiments of the present invention, thetechnical features of the random number generation system can circumventthe requirement of existing systems to post process random bit streamsthat are used for generating the random numbers.

The random number generation system mitigates the effect of the qualityof one or more entropy sources being degraded. For example, ifinsufficient quality entropy supply is available, random numberoperations can be suspended by the controller. Further, in one or moreembodiments of the present invention, if the pool of entropy sources issufficient but below a defined limit, the controller can also notify therandom number generation system for preventive action.

Further yet, in one or more embodiments of the present invention, themitigation facilitates fault (degradation) tolerance. For example, auser can adjust processing algorithms of the random number generatorbased on the entropy quality of entropy sources that are available.

In one or more embodiments of the present invention, the entropy qualitycan vary (meet different evaluation criteria) over time, but the randomnumber generation system can keep producing a valid output by selectingthe right entropy sources.

In one or more embodiments of the present invention, the random numbergeneration systems can be cascaded, i.e., a first random numbergeneration system provides an input to a second random number generationsystem.

Turning now to FIG. 5, a computer system 500 is generally shown inaccordance with an embodiment. The computer system 500 can be anelectronic, computer framework comprising and/or employing any numberand combination of computing devices and networks utilizing variouscommunication technologies, as described herein. In one or moreembodiments of the present invention, the computer system 500 can be aquantum computer. The computer system 500 can be easily scalable,extensible, and modular, with the ability to change to differentservices or reconfigure some features independently of others. Thecomputer system 500 may be, for example, a server, desktop computer,laptop computer, tablet computer, or smartphone. In some examples,computer system 500 may be a cloud computing node.

The computer system 500 can include the random number generation system100 that is depicted in FIG. 1. In one or more embodiments of thepresent invention, the random number generation system 100 is part of ahardware security module (HSM) 550 of the computer system 500. The HSM550 can be a physical computing device that safeguards and managesdigital keys for strong authentication and provides crypto processing.The HSM 550 can include one or more secure random number generationsystems 100. In one or more embodiments of the present invention, therandom number generation systems are cascaded with each other.

Computer system 500 may be described in the general context of computersystem executable instructions, such as program modules, being executedby a computer system. Generally, program modules may include routines,programs, objects, components, logic, data structures, and so on thatperform particular tasks or implement particular abstract data types.Computer system 500 may be practiced in distributed cloud computingenvironments where tasks are performed by remote processing devices thatare linked through a communications network. In a distributed cloudcomputing environment, program modules may be located in both local andremote computer system storage media including memory storage devices.

As shown in FIG. 5, the computer system 500 has one or more centralprocessing units (CPU(s)) 501 a, 501 b, 501 c, etc. (collectively orgenerically referred to as processor(s) 501). The processors 501 can bea single-core processor, multi-core processor, computing cluster, or anynumber of other configurations. The processors 501, also referred to asprocessing circuits, are coupled via a system bus 502 to a system memory503 and various other components. The system memory 503 can include aread only memory (ROM) 504 and a random access memory (RAM) 505. The ROM504 is coupled to the system bus 502 and may include a basicinput/output system (BIOS), which controls certain basic functions ofthe computer system 500. The RAM is read-write memory coupled to thesystem bus 502 for use by the processors 501. The system memory 503provides temporary memory space for operations of said instructionsduring operation. The system memory 503 can include random access memory(RAM), read only memory, flash memory, or any other suitable memorysystems.

The computer system 500 comprises an input/output (I/O) adapter 506 anda communications adapter 507 coupled to the system bus 502. The I/Oadapter 506 may be a small computer system interface (SCSI) adapter thatcommunicates with a hard disk 508 and/or any other similar component.The I/O adapter 506 and the hard disk 508 are collectively referred toherein as a mass storage 510.

Software 511 for execution on the computer system 500 may be stored inthe mass storage 510. The mass storage 510 is an example of a tangiblestorage medium readable by the processors 501, where the software 511 isstored as instructions for execution by the processors 501 to cause thecomputer system 500 to operate, such as is described herein below withrespect to the various Figures. Examples of computer program product andthe execution of such instruction is discussed herein in more detail.The communications adapter 507 interconnects the system bus 502 with anetwork 512, which may be an outside network, enabling the computersystem 500 to communicate with other such systems. In one embodiment, aportion of the system memory 503 and the mass storage 510 collectivelystore an operating system, which may be any appropriate operatingsystem, such as the z/OS or AIX operating system from IBM Corporation,to coordinate the functions of the various components shown in FIG. 5.

Additional input/output devices are shown as connected to the system bus502 via a display adapter 515 and an interface adapter 516 and. In oneembodiment, the adapters 506, 507, 515, and 516 may be connected to oneor more I/O buses that are connected to the system bus 502 via anintermediate bus bridge (not shown). A display 519 (e.g., a screen or adisplay monitor) is connected to the system bus 502 by a display adapter515, which may include a graphics controller to improve the performanceof graphics intensive applications and a video controller. A keyboard521, a mouse 522, a speaker 523, etc. can be interconnected to thesystem bus 502 via the interface adapter 516, which may include, forexample, a Super I/O chip integrating multiple device adapters into asingle integrated circuit. Suitable I/O buses for connecting peripheraldevices such as hard disk controllers, network adapters, and graphicsadapters typically include common protocols, such as the PeripheralComponent Interconnect (PCI). Thus, as configured in FIG. 5, thecomputer system 500 includes processing capability in the form of theprocessors 501, and, storage capability including the system memory 503and the mass storage 510, input means such as the keyboard 521 and themouse 522, and output capability including the speaker 523 and thedisplay 519.

In some embodiments, the communications adapter 507 can transmit datausing any suitable interface or protocol, such as the internet smallcomputer system interface, among others. The network 512 may be acellular network, a radio network, a wide area network (WAN), a localarea network (LAN), or the Internet, among others. An external computingdevice may connect to the computer system 500 through the network 512.In some examples, an external computing device may be an externalwebserver or a cloud computing node.

It is to be understood that the block diagram of FIG. 5 is not intendedto indicate that the computer system 500 is to include all of thecomponents shown in FIG. 5. Rather, the computer system 500 can includeany appropriate fewer or additional components not illustrated in FIG. 5(e.g., additional memory components, embedded controllers, modules,additional network interfaces, etc.). Further, the embodiments describedherein with respect to computer system 500 may be implemented with anyappropriate logic, wherein the logic, as referred to herein, can includeany suitable hardware (e.g., a processor, an embedded controller, or anapplication specific integrated circuit, among others), software (e.g.,an application, among others), firmware, or any suitable combination ofhardware, software, and firmware, in various embodiments.

Although specific embodiments of the invention have been described, oneof ordinary skill in the art will recognize that numerous othermodifications and alternative embodiments are within the scope of theinvention. For example, any of the functionality and/or processingcapabilities described with respect to a particular system, systemcomponent, device, or device component may be performed by any othersystem, device, or component. Further, while various illustrativeimplementations and architectures have been described in accordance withembodiments of the invention, one of ordinary skill in the art willappreciate that numerous other modifications to the illustrativeimplementations and architectures described herein are also within thescope of this invention. In addition, it should be appreciated that anyoperation, element, component, data, or the like described herein asbeing based on another operation, element, component, data, or the likemay be additionally based on one or more other operations, elements,components, data, or the like. Accordingly, the phrase “based on,” orvariants thereof, should be interpreted as “based at least in part on.”

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A computer-implemented method for generating oneor more random numbers, the method comprising: configuring, by acontroller, a mapper to feed a plurality of inputs of a random numbergeneration system using a subset of noise sources from a plurality ofnoise sources, wherein the random number generation system generates arandom number based on the plurality of inputs; evaluating, by thecontroller, the subset of noise sources; detecting, by the controller,that a first noise source from the subset of noise sources has degradedin quality; evaluating, by the controller, a second noise source fromthe plurality of noise sources, the second noise source not being in thesubset of noise sources; in response to the second noise sourcesatisfying at least a predetermined threshold criterion, replacing, bythe controller, the first noise source with the second noise source inthe subset of noise sources; and forwarding, by the mapper, outputs fromeach of the subset of noise sources to corresponding inputs of therandom number generation system, the outputs providing random bitstreams to facilitate generating the random number by the random numbergeneration system.
 2. The computer-implemented method of claim 1,wherein evaluating the subset of noise sources comprises storing aresult for each noise source from the subset of noise sources in alook-up table.
 3. The computer-implemented method of claim 1, whereinthe second noise source is from a second subset of noise sources thatare in a suspended state.
 4. The computer-implemented method of claim 3further comprising, in response to the second subset of noise sourcesbeing empty, notifying a user that the plurality of noise sources do notsatisfy a predetermined quality threshold of random number generation.5. The computer-implemented method of claim 3, further comprising, inresponse to the second subset of noise sources being empty, suspendingthe random number generation.
 6. The computer-implemented method ofclaim 3, further comprising, in response to the second subset of noisesources being empty, causing the random number generation system toexecute a post processing algorithm on the random number that isgenerated to satisfy a predetermined quality threshold of random numbergeneration.
 7. The computer-implemented method of claim 1, whereinreplacing the first noise source comprises setting the first noisesource in a suspended state.
 8. A system for random number generation,the system comprising: a multiplexer; a memory device; and at least oneprocessing unit coupled with the multiplexer and the memory device, theat least one processing unit is configured to perform a methodcomprising: configuring a mapper to feed a plurality of inputs of arandom number generation system using a subset of noise sources from aplurality of noise sources, wherein the random number generation systemgenerates a random number based on the plurality of inputs; evaluatingthe subset of noise sources; detecting that a first noise source fromthe subset of noise sources has degraded in quality; evaluating a secondnoise source from the plurality of noise sources, the second noisesource not being in the subset of noise sources; in response to thesecond noise source satisfying at least a predetermined thresholdcriterion, replacing the first noise source with the second noise sourcein the subset of noise sources; and forwarding, by the mapper, outputsfrom each of the subset of noise sources to corresponding inputs of therandom number generation system, the outputs providing random bitstreams to facilitate generating the random number by the random numbergeneration system.
 9. The system of claim 8, wherein evaluating thesubset of noise sources comprises storing a result for each noise sourcefrom the subset of noise sources into a look-up table.
 10. The system ofclaim 8, wherein the second noise source is from a second subset ofnoise sources that are in a suspended state.
 11. The system of claim 10wherein the method further comprises, in response to the second subsetof noise sources being empty, notifying a user that the plurality ofnoise sources do not satisfy a predetermined quality threshold of randomnumber generation.
 12. The system of claim 10, wherein the methodfurther comprises, in response to the second subset of noise sourcesbeing empty, suspending the random number generation.
 13. The system ofclaim 10, wherein the method further comprises, in response to thesecond subset of noise sources being empty, causing the random numbergeneration system to execute a post processing algorithm on the randomnumber that is generated to satisfy a predetermined quality threshold ofrandom number generation.
 14. The system of claim 8, wherein replacingthe first noise source comprises setting the first noise source in asuspended state.
 15. A computer program product for generating randomnumbers, the computer program product comprising a storage mediumreadable by one or more processing circuits, the storage medium storinginstructions executable by the one or more processing circuits to causea method to be performed, the method comprising: configuring, by acontroller, a mapper to feed a plurality of inputs of a random numbergeneration system using a subset of noise sources from a plurality ofnoise sources, wherein the random number generation system generates arandom number based on the plurality of inputs; evaluating the subset ofnoise sources; detecting that a first noise source from the subset ofnoise sources has degraded in quality; evaluating a second noise sourcefrom the plurality of noise sources, the second noise source not beingin the subset of noise sources; in response to the second noise sourcesatisfying at least a predetermined threshold criterion, replacing thefirst noise source with the second noise source in the subset of noisesources; and forwarding, by the mapper, outputs from each of the subsetof noise sources to corresponding inputs of the random number generationsystem, the outputs providing random bit streams to facilitategenerating the random number by the random number generation system. 16.The computer program product of claim 15, wherein the second noisesource is from a second subset of noise sources that are in a suspendedstate.
 17. The computer program product of claim 16, wherein the methodfurther comprises, in response to the second subset of noise sourcesbeing empty, notifying a user that the plurality of noise sources do notsatisfy a predetermined quality threshold of random number generation.18. The computer program product of claim 16, wherein the method furthercomprises, in response to the second subset of noise sources beingempty, suspending the random number generation.
 19. The computer programproduct of claim 16, wherein the method further comprises, in responseto the second subset of noise sources being empty, causing the randomnumber generation system to execute a post processing algorithm on therandom number that is generated to satisfy a predetermined qualitythreshold of random number generation.
 20. The computer program productof claim 15, wherein replacing the first noise source comprises settingthe first noise source in a suspended state.